@import "./theme.css";
@import "./neutrals.css";

:root {
	--error-color: #960303;
	--even-unit: #02275f;
	--odd-unit: #e20606;
	--orange: #ff9800;
	--teal: #009688;

	scrollbar-color: var(--ClassicBlue80) var(--gray40);
	scrollbar-width: thin;
}

body {
	background: var(--gray10);
	color: var(--gray190);
	fill: var(--gray190);
	stroke: var(--gray190);
}

.hdivider {
	width: 2px;
	background: transparent;
	background-image: url();
	background-repeat: no-repeat;
	background-position: center;
	height: 100%;
	position: relative;
	cursor: col-resize;
	display: block;
	z-index: 5;
}

.hdivider:hover {
	background-color: var(--ClassicBlue50);
	background-image: url();
	background-repeat: no-repeat;
	background-position: center;
}

.vdivider {
	width: 100%;
	height: 2px;
	background: transparent;
	background-image: url();
	background-repeat: no-repeat;
	background-position: center;
	position: relative;
	cursor: row-resize;
	display: block;
	z-index: 5;
}

.vdivider:hover {
	background-color: var(--ClassicBlue50);
	background-image: url();
	background-repeat: no-repeat;
	background-position: center;
}

.wait {
	cursor: wait !important;
}

header {
	background: var(--ClassicBlue70);
	color: var(--white);
	border-bottom: solid 2px var(--ClassicBlue70);
}

footer {
	background: var(--ClassicBlue70);
	color: var(--white);
	border-top: 2px solid var(--ClassicBlue70);
}

a {
	color: var(--ClassicBlue70);
	cursor: pointer;
}

a:hover {
	text-decoration: underline;
}

.status {
	position: absolute;
	top: 200px;
	left: calc(40% - 100px);
	/* width: 200px; */
	margin: auto;
	background-color: var(--ClassicBlue80);
	color: var(--white);
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0px 4px 8px var(--gray130);
}

/* tables */

table {
	width: 100%;
	border-collapse: collapse;
}

thead {
	height: 26px;
	background: var(--ClassicBlue90);
	color: var(--gray10);
}

thead tr {
	position: sticky;
	z-index: 5;
	background: inherit !important;
	color: inherit !important;
	border: none !important;
}

.stripes tr {
	border-top: 2px solid var(--gray50);
	border-bottom: 2px solid var(--gray50);
}

.currentRow {
	border-top: 3px solid var(--ClassicBlue90) !important;
	border-bottom: 3px solid var(--ClassicBlue90) !important;
	background-color: var(--gray10) !important;
}

tbody {
	overflow-y: scroll;
	overflow-x: scroll;
}

td {
	padding: 8px 4px;
	vertical-align: top;
	font-size: medium;
}

td.list {
	vertical-align: middle;
	white-space: nowrap;
}

td.editing {
	background-color: var(--gray10) !important;
	outline: none !important;
}

td.fixed {
	text-align: center;
	vertical-align: middle;
	color: var(--black);
	cursor: default !important;
}

td.initial {
	border-right: 3px solid var(--gray30);
}

td.translated {
	border-right: 3px solid var(--orange);
}

td.reviewed {
	border-right: 3px solid var(--orange);
}

td.final {
	border-right: 3px solid var(--teal);
}

tr.selected {
	background-color: var(--ClassicBlue30) !important;
}

.discover tr:hover {
	background-color: var(--ClassicBlue40) !important;
}

th {
	position: sticky;
	z-index: 5;
	padding: 0px 4px;
	top: 0;
	font-weight: 300;
	background: var(--ClassicBlue90);
	color: var(--gray10);
	fill: var(--gray10);
	stroke: var(--gray10);
	border-bottom: 3px solid var(--ClassicBlue90);
}

.left {
	text-align: left;
}

.sourceContainer {
	background-color: var(--gray20);
	padding: 4px;
	margin: 0;
	width: 100%;
	white-space: pre-wrap;
	border-bottom: 1px solid var(--ClassicBlue70);
}

.targetContainer {
	background-color: var(--gray20);
	padding: 4px;
	margin: 0;
	width: 100%;
	white-space: pre-wrap;
	border-bottom: 1px solid var(--gray20);
}

.machineContainer {
	background-color: var(--gray20);
	padding: 4px;
	margin: 0;
	width: 100%;
	white-space: pre-wrap;
}

.fixed {
	width: 1px;
	text-align: center;
}

.highlighted {
	color: var(--gray40);
	background-color: var(--ClassicBlue70);
	padding-left: 2px;
	padding-right: 2px;
	border-radius: 2px;
}

.difference {
	color: var(--gray190);
	background-color: var(--ClassicBlue40);
	padding-left: 2px;
	padding-right: 2px;
	border-radius: 2px;
}

.right {
	float: right;
}

.hidden {
	display: none;
}

.center {
	text-align: center;
}

.middle {
	vertical-align: middle;
}

/* inputs */

input {
	background-color: var(--gray10);
	color: var(--gray190);
	border: 1px solid var(--gray190);
	margin-top: 3px;
	height: 1.4rem;
	font-size: 1rem;
	border-radius: 2px;
}

.table_input {
	width: calc(100% - 10px);
}

.table_select {
	width: calc(100% - 4px);
}

input:focus {
	outline: none !important;
	border: 1px solid var(--ClassicBlue70);
}

input:focus+label {
	color: var(--ClassicBlue70);
}

input:disabled {
	background-color: var(--gray60);
}

input[type=number] {
	font-size: 0.8em;
	width: 40px;
	margin: 0;
	padding: 0;
	padding-left: 2px;
}

input[type=radio] {
	width: 1em;
	height: 1em;
	margin-top: 0.2em;
	margin-bottom: 0.2em;
	margin-left: 1em;
	margin-right: 0;
	padding: 0;
}

select {
	background-color: var(--gray10);
	color: var(--gray190);
	border: 1px solid var(--gray190);
	font-size: 1em;
	height: 1.6em;
	border-radius: 2px;
}

select:disabled {
	background-color: var(--gray60);
}

select:focus {
	outline: none !important;
	border: 1px solid var(--ClassicBlue70);
}

option {
	font-size: 1em;
	background-color: var(--gray10);
	color: var(--gray190);
}

textarea {
	font-size: medium;
	background-color: var(--gray10);
	color: var(--gray190);
	border: 1px solid var(--gray190);
	border-radius: 4px;
	padding: 8px;
	outline: none;
	resize: none;
}

.dialogBody textarea {
	width: calc(100% - 24px);
	height: calc(100% - 16px);
}

textarea:focus {
	outline: none !important;
	border: 1px solid var(--ClassicBlue70);
}

button {
	color: var(--white);
	background: var(--ClassicBlue80);
	border: 1px solid var(--ClassicBlue80);
	border-radius: 4px;
	font-size: 1em;
	text-align: center;
	margin: 4px;
	padding-left: 8px;
	padding-right: 8px;
	white-space: nowrap;
}

button:focus {
	outline: none !important;
	background: var(--ClassicBlue100);
}

button:hover {
	background: var(--ClassicBlue100);
	border: 1px solid var(--ClassicBlue100);
	transition-property: all;
	transition-duration: 0.5s;
	transition-timing-function: cubic-bezier(0.14, 0.71, 0.38, 1);
	transition-delay: 0s;
}

.row {
	display: flex;
	flex-direction: row;
	width: 100%;
	padding: 0;
}

label {
	padding-left: 4px;
	padding-right: 4px;
}

.column {
	display: flex;
	flex-direction: column;
}

.fill_width {
	width: 100%;
}

.form_height {
	height: 2rem;
}

.noWrap {
	white-space: nowrap;
}

.paddedArea {
	padding: 4px;
	margin: 4px;
}

.optionBox {
	border: 1px solid var(--gray90);
	border-radius: 4px;
}

.buttonArea {
	display: flex;
	flex-direction: row;
	padding: 8px 16px;
	justify-content: flex-end;
}

.inputArea {
	display: flex;
	flex-direction: row;
	vertical-align: middle;
}

/* toolbars */

.radiobar {
	display: flex;
	flex-direction: row;
	color: var(--gray190);
	fill: var(--ClassicBlue70);
	stroke: var(--ClassicBlue70);
	padding: 2px 4px;
	justify-content: flex-start;
	border-bottom: 2px solid var(--ClassicBlue70);
}

.toolbar {
	display: flex;
	flex-direction: row;
	background: var(--gray50);
	color: var(--gray190);
	fill: var(--ClassicBlue70);
	stroke: var(--ClassicBlue70);
	padding: 2px 4px;
	justify-content: flex-start;
}

.toolbar button {
	padding: 4px;
	background: inherit;
	border: none;
	outline: none;
	color: inherit;
	fill: inherit;
	stroke: inherit;
	text-align: left;
	font-size: 0.8em;
	vertical-align: middle;
	box-shadow: none;
}

.toolbar button img {
	padding: 4px;
}

.toolbar a {
	color: inherit;
	fill: inherit;
	stroke: inherit;
	margin-left: 2px;
	margin-right: 2px;
}

.toolbar a img {
	padding-top: 4px;
}

.toolbar a svg {
	padding-top: 4px;
	color: var(--gray160);
	fill: var(--gray160);
	stroke: var(--gray160);
}

.toolbar a:hover {
	background-color: var(--gray20);
	text-decoration: none !important;
	transition-property: all;
	transition-duration: 0.5s;
	transition-timing-function: cubic-bezier(0.14, 0.71, 0.38, 1);
	transition-delay: 0s;
	border-radius: 2px;
}

svg {
	fill: var(--black);
	stroke: var(--black);
	stroke-width: 0.1;
}

th svg {
	margin-top: 4px;
	fill: var(--gray10) !important;
	stroke: var(--gray10) !important;
}

/* tabs */

.tabHolder {
	display: flex;
	flex-flow: row;
	color: var(--black);
	margin: 0px;
	padding: 0px 0px 0px 8px;
	border-bottom: 1px solid var(--gray50);
}

.tab {
	overflow: hidden;
	color: var(--gray150);
	fill: var(--gray150);
	stroke: var(--gray150);
	padding: 4px 12px;
	margin: 0;
	vertical-align: middle;
	box-shadow: none !important;
	text-decoration: none !important;
}

.selectedTab {
	background: var(--gray50);
	color: var(--black);
	border-left: 1px solid var(--gray60) !important;
	border-right: 1px solid var(--gray60) !important;
}

.tab:hover {
	color: var(--ClassicBlue70);
	fill: var(--ClassicBlue70);
	stroke: var(--ClassicBlue70);
}

.selectedTab:hover {
	color: var(--black);
	fill: var(--black);
	stroke: var(--black);
}

.tab a {
	color: inherit;
	fill: inherit;
	stroke: inherit;
	text-decoration: none;
	cursor: pointer;
}

.tab a:hover {
	color: inherit;
	fill: inherit;
	stroke: inherit;
}

.tabContent {
	display: block;
}

.panel {
	z-index: 5;
	display: block;
	overflow-y: scroll;
}

.titlepanel {
	margin: 0;
	padding-top: 0;
	padding-left: 4px;
	border-radius: 4px 4px 0px 0px;
	background: var(--ClassicBlue90);
	color: var(--gray10);
	white-space: nowrap;
	overflow-x: hidden;
	height: 26px;
	vertical-align: middle;
}

.roundedBottom {
	border-radius: 0px 0px 4px 4px;
}

.panelcontent {
	z-index: -20;
	display: block;
	width: 100%;
	overflow-y: auto;
	overflow-x: auto;
}

.panelcontent table {
	z-index: -30;
}

/* tooltips */

.tooltip {
	position: relative;
	display: inline-block;
}

.tooltip .tooltiptext {
	background-color: var(--ClassicBlue30);
	color: var(--black);
	visibility: hidden;
	padding: 4px;
	border-radius: 2px;
	white-space: nowrap;
	/* Position the tooltip */
	position: absolute;
	z-index: 100;
}

/* Tooltip arrow */
.bottomTooltip .tooltiptext::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 8px;
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent var(--ClassicBlue30) transparent;
}

.bottomRightTooltip .tooltiptext::before {
  content: "";
  position: absolute;
  bottom: 100%;
  right: 8px;
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent var(--ClassicBlue30) transparent;
}

.bottomCenterTooltip .tooltiptext::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 80px;
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent var(--ClassicBlue30) transparent;
}

.topTooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 8px;
  border-width: 8px;
  border-style: solid;
  border-color: var(--ClassicBlue30) transparent transparent transparent;
}

.topTooltip .tooltiptext {
	bottom: 130%;
	left: 0px;
}

.bottomTooltip .tooltiptext {
	top: 130%;
	left: 0px;
}

.bottomCenterTooltip .tooltiptext {
	top: 130%;
	left: -80px;
}

.bottomRightTooltip .tooltiptext {
	top: 130%;
	right: 0px;
}

.tooltip:hover .tooltiptext {
	visibility: visible;
}

.iconTooltip {
	position: relative;
	display: inline-block;
}

.iconTooltip .tooltiptext {
	background-color: var(--ClassicBlue30);
	color: var(--black);
	visibility: hidden;
	padding: 4px;
	border-radius: 4px;
	white-space: nowrap;
	/* Position the tooltip */
	position: absolute;
	z-index: 100;
}

.iconTooltip:hover .tooltiptext {
	visibility: visible;
}

.highlight {
	color: var(--gray40);
}

.active svg {
	stroke: var(--ClassicBlue70) !important;
	fill: var(--ClassicBlue70) !important;
}

.bordered {
	border: 1px solid var(--black) !important;
	border-radius: 2px;
}

.error {
	color: var(--error-color) !important;
}

.preserve {
	white-space: pre-wrap;
}

.divContainer {
	/* Any container that needs to scroll content */
	width: 100%;
	height: 100%;
	overflow: auto;
}

div.stats {
	white-space: nowrap;
	display: flex;
	flex-direction: row;
}

span.stats {
	margin-top: 4px;
	padding-left: 4px;
	padding-right: 4px;
}

svg.stats {
	margin-top: 4px;
	cursor: default;
}

.statsRect {
	stroke-width: 1;
	stroke: var(--black);
	fill: var(--gray20);
}

.statsFiller {
	stroke: none;
	fill: var(--ClassicBlue50);
}

.statsText {
	dominant-baseline: middle;
	text-anchor: middle;
	fill: var(--black);
}

.space {
	background: var(--ClassicBlue50);
	border-radius: 2px;
	font-weight: 700;
}

.splitting {
	background: var(--ClassicBlue40);
}

.evenUnit {
	border-right-color: var(--even-unit) !important;
}

.oddUnit {
	border-right-color: var(--odd-unit) !important;
}

.paddedPanel {
	margin-top: 8px;
	margin-right: 8px;
	margin-left: 8px;
	margin-bottom: 8px;
	border-radius: 4px;
	width: calc(100% - 16px);
	height: calc(100% - 16px);
	overflow: auto;
	background: var(--gray30);
}

.leftPaddedPanel {
	margin-top: 8px;
	margin-right: 4px;
	margin-left: 8px;
	margin-bottom: 8px;
	border-radius: 4px;
	width: calc(100% - 12px);
	height: calc(100% - 16px);
	overflow-y: auto;
	overflow-x: hidden;
	background: var(--gray30);
}

.rightPaddedPanel {
	margin: 0px;
	width: 100%;
	height: 100%;
}

.topPaddedPanel {
	margin-top: 8px;
	margin-right: 8px;
	margin-left: 4px;
	margin-bottom: 4px;
	border-radius: 4px;
	width: calc(100% - 12px);
	height: calc(100% - 12px);
	background: var(--gray30);
}

.centerPaddedPanel {
	margin-top: 4px;
	margin-right: 8px;
	margin-left: 4px;
	margin-bottom: 4px;
	border-radius: 4px;
	width: calc(100% - 12px);
	height: calc(100% - 8px);
	background: var(--gray30);
}

.bottomPaddedPanel {
	margin-top: 4px;
	margin-right: 8px;
	margin-left: 4px;
	margin-bottom: 8px;
	border-radius: 4px;
	width: calc(100% - 12px);
	height: calc(100% - 12px);
	background: var(--gray30);
}

::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-track-piece {
	background: var(--gray50);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb {
	background: var(--ClassicBlue80);
	border-radius: 4px;
}

::-webkit-scrollbar-corner {
	background:  var(--ClassicBlue80);
}

::-webkit-scrollbar-button {
	background: var(--ClassicBlue80);
}

.arrow-down:after {
	content: "\2193";
	display: inline-block;
	vertical-align: text-bottom;
	margin-left: 4px;
}

.arrow-up:after {
	content: "\2191";
	display: inline-block;
	vertical-align: text-bottom;
	margin-left: 4px;
}

.dialogBody {
	padding: 8px 0px 16px 8px;
	overflow-y: hidden;
}

/* 术语抽取界面样式 */
.progressBar {
	width: calc(100% - 60px);
	height: 20px;
	background-color: var(--gray50);
	border: 1px solid var(--gray90);
	border-radius: 10px;
	overflow: hidden;
	display: inline-block;
	margin-right: 10px;
}

.progressFill {
	height: 100%;
	background: linear-gradient(90deg, var(--ClassicBlue70), var(--ClassicBlue90));
	width: 0%;
	transition: width 0.3s ease;
}

.terms_list {
	max-height: 300px;
	overflow-y: auto;
	border: 1px solid var(--gray90);
	border-radius: 4px;
	background: var(--gray10);
	padding: 8px;
}

.term_item {
	display: flex;
	align-items: center;
	padding: 8px;
	margin: 4px 0;
	border: 1px solid var(--gray60);
	border-radius: 4px;
	background: var(--gray20);
	transition: background-color 0.2s ease;
}

.term_item:hover {
	background: var(--gray30);
}

.term_item.selected {
	background: var(--ClassicBlue30);
	border-color: var(--ClassicBlue70);
}

.term_checkbox {
	margin-right: 12px;
	width: 16px;
	height: 16px;
}

.term_content {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.term_source {
	font-weight: bold;
	color: var(--gray190);
	margin-bottom: 4px;
}

.term_target {
	color: var(--gray160);
	font-style: italic;
}

.term_context {
	font-size: 0.9em;
	color: var(--gray130);
	margin-top: 4px;
	padding-top: 4px;
	border-top: 1px solid var(--gray60);
}

.center_text {
	text-align: center;
}

.small_text {
	font-size: 0.9em;
	color: var(--gray130);
}

.bold {
	font-weight: bold;
}

.btn_primary {
	background: var(--ClassicBlue80);
	color: var(--white);
	border: 1px solid var(--ClassicBlue80);
}

.btn_primary:hover {
	background: var(--ClassicBlue100);
	border: 1px solid var(--ClassicBlue100);
}

.btn_primary:disabled {
	background: var(--gray80);
	border: 1px solid var(--gray80);
	color: var(--gray130);
	cursor: not-allowed;
}

.btn_secondary {
	background: var(--gray60);
	color: var(--gray190);
	border: 1px solid var(--gray90);
}

.btn_secondary:hover {
	background: var(--gray80);
	border: 1px solid var(--gray110);
}

.btn_secondary:disabled {
	background: var(--gray50);
	border: 1px solid var(--gray70);
	color: var(--gray110);
	cursor: not-allowed;
}

.divider {
	height: 1px;
	background: var(--gray60);
	margin: 12px 0;
}

/* Term extraction styles */
.term-extraction-info {
    margin-bottom: 20px;
}

.term-extraction-info table {
    width: 100%;
}

.term-extraction-info td {
    padding: 8px 4px;
    vertical-align: middle;
}

.term-extraction-info .label-cell {
    width: 100px;
    font-weight: bold;
    white-space: nowrap;
}

.term-extraction-progress {
    margin: 15px 0;
}

.term-extraction-current-segment {
    margin-top: 8px;
    padding: 10px;
    background-color: var(--background);
    border-radius: 4px;
    border: 1px solid var(--border);
    font-style: italic;
    color: var(--text-secondary);
    min-height: 20px;
}

.term-extraction-results {
    margin: 15px 0;
}

.term-extraction-toolbar {
    margin: 10px 0;
    overflow: hidden;
}

.term-extraction-button-group {
    float: right;
}

.term-extraction-button-group button {
    margin-left: 8px;
}

.terms_list {
    max-height: 350px;
    min-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 10px;
    background-color: var(--background);
    scrollbar-width: thin;
    scrollbar-color: var(--gray70) var(--background);
}

.terms_list::-webkit-scrollbar {
    width: 8px;
}

.terms_list::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 4px;
}

.terms_list::-webkit-scrollbar-thumb {
    background: var(--gray70);
    border-radius: 4px;
}

.terms_list::-webkit-scrollbar-thumb:hover {
    background: var(--gray90);
}

.term-item {
    padding: 8px;
    margin: 4px 0;
    border: 1px solid var(--border);
    border-radius: 4px;
    background-color: var(--white);
    cursor: pointer;
}

.term-item:hover {
    background-color: var(--highlight);
}

.term-item.selected {
    background-color: var(--selected);
    border-color: var(--primary);
}

.term-source {
    font-weight: bold;
    color: var(--primary);
}

.term-target {
    color: var(--text);
    margin-left: 10px;
}

.term-context {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: 4px;
    font-style: italic;
}

.adding-progress {
    display: none;
    padding: 10px;
    background-color: var(--highlight);
    border: 1px solid var(--primary);
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
}

.adding-progress.show {
    display: block;
}

.adding-progress-text {
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 5px;
}

.adding-progress-bar {
    width: 100%;
    height: 6px;
    background-color: var(--background);
    border-radius: 3px;
    overflow: hidden;
}

.adding-progress-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

/* 术语库管理界面滚动条样式 */
.table-container {
    scrollbar-width: thin;
    scrollbar-color: var(--gray70) var(--background);
}

.table-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.table-container::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.table-container::-webkit-scrollbar-thumb {
    background: var(--gray70);
    border-radius: 6px;
    border: 2px solid var(--background);
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: var(--gray90);
}

.table-container::-webkit-scrollbar-corner {
    background: var(--background);
}